import BASE_URLS from "@/api/config.js"
import http from "@/utils/http.js"
export default {
	urls: {
		getArticleList: BASE_URLS.CMS_BASE_URL + "/f/getArticleList",
		getArticleDetail: BASE_URLS.CMS_BASE_URL + "/f/view-content"
	},
	getArticleList: function(params) {
		return http.request({
			url: this.urls.getArticleList,
			data: params,
			method: "GET"
		});
	},
	// 新闻资讯
	getNews: function(pageNo = 1, number = 10) {
		return this.getArticleList({
			categoryId: 2,
			number: number,
			siteId: 1,
			pageNo: pageNo
		});
	},
	// 通知公告
	getMessage: function(pageNo = 1, number = 10) {
		return this.getArticleList({
			categoryId: 10,
			number: number,
			siteId: 1,
			pageNo: pageNo
		});

	},
	// 操作指南
	getGuide: function(pageNo = 1, number = 10) {
		return this.getArticleList({
			categoryId: '2e84083f4fea46eeb1fffd200cf7a907',
			number: number,
			siteId: 1,
			pageNo: pageNo
		});

	},
	//文章详情
	getDetail: function(params) {
		return http.request({
			url: this.urls.getArticleDetail + "-" + params.categoryId + "-" + params.contentId,
			method: "GET"
		});
	}
}
